var express = require("express");

var router = express.Router();
let {getshopData,getDetail,removeAdmin,addAdmin,updateAdmin} = require('../controller/shoplist');
// console.log('程序进来了');
//获取所有的商品数据

router.get('/api/shoplist',getshopData);
//获取一个商品的数据
router.get('/api/detail/:id',getDetail);

//后台删除数据
router.post('/api/admin/remove',removeAdmin)
//后台增加数据
router.post('/api/admin/add',addAdmin)
//后台修改数据
router.put('api/admin/update/:id',updateAdmin)
module.exports = router;